package kr.pe.johnkim.app.mobile.rest.service;

import kr.pe.johnkim.app.domain.MyHistoryItemEvent;
import kr.pe.johnkim.app.mobile.rest.dao.MyHistoryItemEventDao;
import kr.pe.johnkim.app.mobile.rest.dao.MyHistoryItemEventDaoImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;

/**
 * @author : johnkim <cale9797@gmail.com / Bettersoft Inc,.>
 * @Date : 12. 2. 18.
 */
public class MyHistoryItemEventServiceImpl implements MyHistoryItemEventService {
    // SLF4J Logging
	private Logger logger = LoggerFactory.getLogger(MyHistoryItemEventServiceImpl.class);
    
    /**
     * 아이템 이벤트를 등록 한다.
     *
     * @param myHistoryItemEvent
     * @return
     */
    @Override
    public boolean registerItemEvent(MyHistoryItemEvent myHistoryItemEvent) {
        logger.info("registerItemEvent");
        return myHistoryItemEventDao.registerItemEvent(myHistoryItemEvent);
    }

    /**
     * 아이템 이벤트 목록을 가져 온다.
     *
     * @param myHistoryItemEvent
     * @return
     */
    @Override
    public List<MyHistoryItemEvent> selectItemEventList(MyHistoryItemEvent myHistoryItemEvent) {
        logger.info("selectItemEventList");
        return myHistoryItemEventDao.selectItemEventList(myHistoryItemEvent);
    }

    /**
     * 아이템 이벤트를 수정 한다.
     *
     * @param myHistoryItemEvent
     * @return
     */
    @Override
    public boolean updateItemEvent(MyHistoryItemEvent myHistoryItemEvent) {
        logger.info("updateItemEvent");
        return myHistoryItemEventDao.updateItemEvent(myHistoryItemEvent);
    }

    /**
     * 아이템 이벤트를 비활성화 한다.
     *
     * @param myHistoryItemEvent
     * @return
     */
    @Override
    public boolean updateDeactivateItemEvent(MyHistoryItemEvent myHistoryItemEvent) {
        logger.info("pdateDeactivateItemEvent");
        return myHistoryItemEventDao.updateDeactivateItemEvent(myHistoryItemEvent);
    }

    /**
     * Spring Setter Injection.
     */
    private MyHistoryItemEventDao myHistoryItemEventDao;

    public void setMyHistoryItemEventDao(MyHistoryItemEventDaoImpl myHistoryItemEventDao) {
        this.myHistoryItemEventDao = myHistoryItemEventDao;
    }
}
